package com.xyh.service.impl;

import com.xyh.entity.YxcUser;
import com.xyh.entity.YxcUsersYhq;
import com.xyh.entity.YxcYhq;
import com.xyh.mapper.YxcUsersYhqMapper;
import com.xyh.service.YxcUsersYhqService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class YxcUsersYhqServiceImpl implements YxcUsersYhqService {

    @Resource
    private YxcUsersYhqMapper yxcUsersYhqMapper;

    @Override
    public List<YxcUsersYhq> getAllYhqByPhone(String owner_telephone) {
        return yxcUsersYhqMapper.getAllYhqByPhone(owner_telephone);
    }

    @Override
    public int updateNumByPhoneAndBh(String owner_telephone, int yhq_bh) {
        return yxcUsersYhqMapper.updateNumByPhoneAndBh(owner_telephone,yhq_bh);
    }

    @Override
    public int deleteByPhoneAndBhAndNum(String owner_telephone, int yhq_bh) {
        return yxcUsersYhqMapper.deleteByPhoneAndBhAndNum(owner_telephone,yhq_bh);
    }

    @Override
    public int updateCyNumByPhoneAndBh(String telephone, int yhq_bh, int num_add) {
        return yxcUsersYhqMapper.updateCyNumByPhoneAndBh(telephone,yhq_bh,num_add);
    }

    @Override
    public int addOneUserYhq(String user_name,String telephone,int yhq_bh,String yhq_name, int cy_num) {
        return yxcUsersYhqMapper.addOneUserYhq(user_name,telephone,yhq_bh,yhq_name,cy_num);
    }
}
